import request from '@/utils/request'
// 列表
export function getDataList(query) {
  return request({
    url: '/car/insurance/list',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getInsuranceDetails(id) {
  return request({
    url: '/car/insurance/' + id,
    method: 'get'
  })
}


// 删除
export function delInsurance(id) {
  return request({
    url: '/car/insurance/' + id,
    method: 'delete'
  })
}

// 编辑
export function updateInsurance(data) {
    return request({
      url: '/car/insurance',
      method: 'put',
      data: data
    })
  }

//保险管理详情
export function getInsuranceDetailss(params) {
  return request({
    url:`/car/insurance/getInfoByCode`,
    method: 'get',
    params
  })
}

//保险变更
export function getInsuranceChangeList(id) {
  return request({
    url:`/car/insurance/getInsuranceChangeList/${id}`,
    method: 'get',
  })
}

//提交保险变更
export function addInsuranceChange(data) {
  return request({
    url:`/car/insurance/addInsuranceChange`,
    method: 'post',
    data
  })
}


//根据商业险id和险种类型查询险种保额
export function getInsuranceBusinessQuota(params) {
  return request({
    url:`/car/insurance/getInsuranceBusinessQuota`,
    method: 'get',
    params
  })
}
